package com.web.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class ParaneterTestController {


    @GetMapping("/car/{id}/owven/{username}")
    public Map<String,Object> getCat(
            @PathVariable("id") Integer id,
            @PathVariable("username" ) String name,
            @PathVariable Map<String,String> pv,
            @RequestHeader("Host") String host){
        Map<String,Object> map = new HashMap<>();
        map.put("id",id);
        map.put("name",name);
        map.put("pv",pv);
        map.put("host",host);
        return  map;

    }
}
